﻿<%@ CodePage=65001   Language=VBScript  %> 
<!--#include file=MD5.asp-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="Content-Language" content="zh-CN"/>
	<meta http-equiv="Expires" CONTENT="0">        
	<meta http-equiv="Cache-Control" CONTENT="no-cache">        
	<meta http-equiv="Pragma" CONTENT="no-cache">
	<title>通联网上支付平台-商户接口范例-支付请求信息签名</title>
</head>
<body>
	<%
		'页面编码要与参数inputCharset一致，否则服务器收到参数值中的汉字为乱码而导致验证签名失败。
		inputCharset=Request("inputCharset")
		pickupUrl=Request("pickupUrl")
		receiveUrl=Request("receiveUrl")
		version=Request("version")
		language=Request("language")
		signType=Request("signType")
		merchantId=Request("merchantId")
		payerName=Request("payerName")
		payerEmail=Request("payerEmail")
		payerTelephone=Request("payerTelephone")
		payerIDCard=Request("payerIDCard")
		pid=Request("pid")
		orderNo=Request("orderNo")
		orderAmount=Request("orderAmount")
		orderCurrency=Request("orderCurrency")
		orderDatetime=Request("orderDatetime")
		orderExpireDatetime=Request("orderExpireDatetime")
		productName=Request("productName")
		productPrice=Request("productPrice")
		productNum=Request("productNum")
		productId=Request("productId")
		productDesc=Request("productDesc")
		ext1=Request("ext1")
		ext2=Request("ext2")
		extTL=Request("extTL")
		payType=Request("payType")
		issuerId=Request("issuerId")
		pan=Request("pan")
		tradeNature=Request("tradeNature")
		md5Key = Request("key")
		'构造订单请求签名原串，调用md5生成signMsg。
		
		Dim bufSignSrc
		bufSignSrc=""
		
        bufSignSrc=appendSignPara(bufSignSrc, "inputCharset",inputCharset)
        bufSignSrc=appendSignPara(bufSignSrc, "pickupUrl", pickupUrl)
        bufSignSrc=appendSignPara(bufSignSrc, "receiveUrl", receiveUrl)
        bufSignSrc=appendSignPara(bufSignSrc, "version", version)
        bufSignSrc=appendSignPara(bufSignSrc, "language", language)
        bufSignSrc=appendSignPara(bufSignSrc, "signType", signType)
        bufSignSrc=appendSignPara(bufSignSrc, "merchantId", merchantId)
        bufSignSrc=appendSignPara(bufSignSrc, "payerName", payerName)
        bufSignSrc=appendSignPara(bufSignSrc, "payerEmail", payerEmail)
        bufSignSrc=appendSignPara(bufSignSrc, "payerTelephone", payerTelephone)
        bufSignSrc=appendSignPara(bufSignSrc, "payerIDCard", payerIDCard)
        bufSignSrc=appendSignPara(bufSignSrc, "pid", pid)
        bufSignSrc=appendSignPara(bufSignSrc, "orderNo", orderNo)
        bufSignSrc=appendSignPara(bufSignSrc, "orderAmount", orderAmount)
        bufSignSrc=appendSignPara(bufSignSrc, "orderCurrency", orderCurrency)
        bufSignSrc=appendSignPara(bufSignSrc, "orderDatetime", orderDatetime)
        bufSignSrc=appendSignPara(bufSignSrc, "orderExpireDatetime", orderExpireDatetime)
        bufSignSrc=appendSignPara(bufSignSrc, "productName", productName)
        bufSignSrc=appendSignPara(bufSignSrc, "productPrice", productPrice)
        bufSignSrc=appendSignPara(bufSignSrc, "productNum", productNum)
        bufSignSrc=appendSignPara(bufSignSrc, "productId", productId)
        bufSignSrc=appendSignPara(bufSignSrc, "productDesc", productDesc)
        bufSignSrc=appendSignPara(bufSignSrc, "ext1", ext1)
        bufSignSrc=appendSignPara(bufSignSrc, "ext2", ext2)
        bufSignSrc=appendSignPara(bufSignSrc, "extTL", extTL)
        bufSignSrc=appendSignPara(bufSignSrc, "payType", payType)
        bufSignSrc=appendSignPara(bufSignSrc, "issuerId", issuerId)
        bufSignSrc=appendSignPara(bufSignSrc, "pan", pan)
        bufSignSrc=appendSignPara(bufSignSrc, "tradeNature", tradeNature)
        bufSignSrc=appendLastSignPara(bufSignSrc, "key", md5Key)
				
		srcMsg = bufSignSrc  '此方法用于debug，测试通过后可注释。
		signMsg = MD5(srcMsg) '签名，设为signMsg字段值。

	%>
	
	<!--
		1、订单可以通过post方式或get方式提交，建议使用post方式；
		   提交支付请求可以使用http或https方式，建议使用https方式。
		2、通联支付网关地址、商户号及key值，在接入测试时由通联提供；
		   通联支付网关地址、商户号，在接入生产时由通联提供，key值在通联支付网关会员服务网站上设置。
	-->
	<center>
	<!--================= post 方式提交支付请求 start =====================-->
	<!--================= 测试地址为 http://ceshi.allinpay.com/gateway/index.do =====================-->
	<!--================= 生产地址请在测试环境下通过后从业务人员获取 =====================-->
	<form name="form2" action="http://ceshi.allinpay.com/gateway/index.do" method="post">
		<input type="hidden" name="inputCharset" value="<%=inputCharset%>"/>
		<input type="hidden" name="pickupUrl" value="<%=pickupUrl%>"/>
		<input type="hidden" name="receiveUrl" value="<%=receiveUrl%>" />
		<input type="hidden" name="version" value="<%=version %>"/>
		<input type="hidden" name="language" value="<%=language %>" />
		<input type="hidden" name="signType" value="<%=signType%>"/>
		<input type="hidden" name="merchantId" value="<%=merchantId%>" />
		<input type="hidden" name="payerName" value="<%=payerName%>"/>
		<input type="hidden" name="payerEmail" value="<%=payerEmail%>" />
		<input type="hidden" name="payerTelephone" value="<%=payerTelephone %>" />
		<input type="hidden" name="payerIDCard" value="<%=payerIDCard %>" />
		<input type="hidden" name="pid" value="<%=pid%>"/>
		<input type="hidden" name="orderNo" value="<%=orderNo%>" />
		<input type="hidden" name="orderAmount" value="<%=orderAmount %>"/>
		<input type="hidden" name="orderCurrency" value="<%=orderCurrency%>" />
		<input type="hidden" name="orderDatetime" value="<%=orderDatetime%>" />
		<input type="hidden" name="orderExpireDatetime" value="<%=orderExpireDatetime %>"/>
		<input type="hidden" name="productName" value="<%=productName%>" />
		<input type="hidden" name="productPrice" value="<%=productPrice%>" />
		<input type="hidden" name="productNum" value="<%=productNum %>"/>
		<input type="hidden" name="productId" value="<%=productId%>" />
		<input type="hidden" name="productDesc" value="<%=productDesc%>" />
		<input type="hidden" name="ext1" value="<%=ext1%>" />
		<input type="hidden" name="ext2" value="<%=ext2%>" />
		<input type="hidden" name="payType" value="<%=payType%>" />
		<input type="hidden" name="issuerId" value="<%=issuerId%>" />
		<input type="hidden" name="pan" value="<%=pan %>" />
		<input type="hidden" name="signMsg" value="<%=signMsg %>" />

	    <input type="submit" value="确认付款，到通联支付去啦"/>
	</form>
	<!--================= post 方式提交支付请求 end =====================-->
	</center>


srcMsg报文明文为：<%=srcMsg%>
<br>
signMsg签名为：<%=signMsg%>
</body>
</html>